﻿<UserControl x:Class="GrooveSharp.ConfigurationFlags"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="303" d:DesignWidth="477">

    <UserControl.Resources>
        <ResourceDictionary Source="..\Resources\GlassButton.xaml"/>
    </UserControl.Resources>

    <GroupBox Header="Flags" >
        <StackPanel Orientation="Vertical" >
            <ListView Name="theListView">

                <ListView.ItemContainerStyle>
                    <Style TargetType="{x:Type ListViewItem}" BasedOn="{StaticResource GrooveSharpListViewItem}" />
                </ListView.ItemContainerStyle>

                <ListView.View>
                    <GridView>
                        <GridView.Columns>
                            <GridViewColumn Header="Active" Width="40" >
                                <GridViewColumn.CellTemplate >
                                    <DataTemplate>
                                        <CheckBox IsChecked="{Binding Active}"></CheckBox>
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>

                            <GridViewColumn Header="Flag" Width="200" >
                                <GridViewColumn.CellTemplate >
                                    <DataTemplate>
                                        <TextBox Text="{Binding FlagName}" Background="Black" Foreground="White" BorderThickness="0.25"></TextBox>
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>

                            <GridViewColumn Header="Number of tracks" Width="100" DisplayMemberBinding="{Binding Count}" />

                        </GridView.Columns>
                    </GridView>
                </ListView.View>
            </ListView>

            <StackPanel Background="Black" Orientation="Horizontal" Name="topFlagStack">

                <Button Name="buttonFlagAdd" Style="{StaticResource GlassButtonMedium}" ToolTip="Add a folder containing albums" Click="buttonAdd_Click">
                    <Image Source="../Images/plus.png" Style="{StaticResource ImageForMedium}"  />
                </Button>
                <Button Name="buttonFlagRemove" Style="{StaticResource GlassButtonMedium}" ToolTip="Remove an empty (unused) folder" Click="buttonRemove_Click">
                    <Image Source="../Images/minus.png" Style="{StaticResource ImageForMedium}"  />
                </Button>
                <Button Name="buttonFlagRefresh" Style="{StaticResource GlassButtonMedium}" ToolTip="Refresh contents" Click="buttonRefresh_Click">
                    <Image Source="../Images/refresh.png" Style="{StaticResource ImageForMedium}"  />
                </Button>
            </StackPanel>

        </StackPanel>

    </GroupBox>
</UserControl>
